import { sleep } from "@/utils";
import IpcParams from "../IpcParams";
import { createAgent } from './utils';
import Axios from 'axios';
import axiosRetry from 'axios-retry';
// import MemefiTgweb from "@/views/memefi/worker/memefi_tgweb";

export default class MemefiGame {
  constructor(tokenInfo) {
    this.tokenInfo = tokenInfo
    const agent = createAgent(this.tokenInfo.proxy)
    const headers = {
      "Referer": "https://tg-app.memefi.club/",
      "origin": "https://tg-app.memefi.club",
      "x-requested-with": "org.telegram.messenger.web",
      "Content-Type": "application/json",
      "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
    }
    this.axios = Axios.create({
      headers: headers,
      httpAgent: agent,
      httpsAgent: agent,
      timeout: 90 * 1000,
    })
    axiosRetry(this.axios, {
      retries: 5, retryDelay: (retryCount) => {
        return 2000
      }
    });
  }

  async run() {
    try {

    } catch (error) {

    }
  }
}
